package cn.changein.framework.api.other;

import cn.changein.framework.kernel.model.response.ResponseData;
import cn.changein.framework.model.other.CheckUpdateDTO;
import cn.changein.framework.service.other.OtherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**

 */
@RestController
@RequestMapping("/api/other/")
public class ApiOtherController {

    @Autowired
    OtherService otherService;

    /**
     * 获取需要隐藏的图标
     */
    @RequestMapping("getHideIconText")
    public ResponseData getHideIconText() {
        List<String> iconTextList = otherService.getHideIconText();
        return ResponseData.success(iconTextList);
    }


    /**
     * 检查是否需要更新
     */
    @RequestMapping("checkUpdate")
    public ResponseData checkUpdate(@RequestBody CheckUpdateDTO checkUpdateDTO) {
        return otherService.getUpdateConfig(checkUpdateDTO);
    }

}
